From: Takao Fujiwara Date: Tue, 11 Dec 2018 07:18:59 +0000 (+0900) Subject: inputMethod: Delete the enabled member since it's not used X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2^2~159 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ae48f8bda9daa7794d51d6492d0d33f4ca5e6844;p=gnome-shell.git inputMethod: Delete the enabled member since it's not used When `ibus restart` runs, InputMethod.enabled is changed to false and no longer enable ibus but 'enabled' and 'disabled' signals are not used in the current IBus clients and it's good to delete the member simply. https://gitlab.gnome.org/GNOME/gnome-shell/issues/295 --- diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js index 0f5590b3f..98761a63d 100644 --- a/js/misc/inputMethod.js +++ b/js/misc/inputMethod.js @@ -13,7 +13,6 @@ var InputMethod = new Lang.Class({ this.parent(); this._hints = 0; this._purpose = 0; - this._enabled = true; this._currentFocus = null; this._preeditStr = ''; this._preeditPos = 0; @@ -62,8 +61,6 @@ var InputMethod = new Lang.Class({ _setContext(bus, res) { this._context = this._ibus.create_input_context_async_finish(res); - this._context.connect('enabled', () => { this._enabled = true }); - this._context.connect('disabled', () => { this._enabled = false }); this._context.connect('commit-text', this._onCommitText.bind(this)); this._context.connect('delete-surrounding-text', this._onDeleteSurroundingText.bind(this)); this._context.connect('update-preedit-text', this._onUpdatePreeditText.bind(this)); @@ -78,7 +75,6 @@ var InputMethod = new Lang.Class({ this._context = null; this._hints = 0; this._purpose = 0; - this._enabled = false; this._preeditStr = '' this._preeditPos = 0; this._preeditVisible = false; @@ -236,7 +232,7 @@ var InputMethod = new Lang.Class({ }, vfunc_filter_key_event(event) { - if (!this._context || !this._enabled) + if (!this._context) return false; if (!this._currentSource) return false;